//
//  GYNavagation.m
//  01-动态透明效果
//
//  Created by 啦啦啦 on 15/12/29.
//  Copyright © 2015年 啦啦啦. All rights reserved.
//

#import "GYNavagation.h"

@implementation GYNavagation

- (id)initWithRootViewController:(UIViewController *)rootViewController
{
    self = [super initWithRootViewController:rootViewController];
    if (self) {
        CGRect frame = self.navigationBar.frame;
        alphaView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height+20)];
        alphaView.backgroundColor = [UIColor redColor];
        alphaView.alpha =0.0;
        [self.view insertSubview:alphaView aboveSubview:self.navigationBar];
        [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"bigShadow"] forBarMetrics:UIBarMetricsCompact];
    }
    return self;
}

@synthesize alphaView;
- (void)setAlph:(CGFloat)alph
{
    alphaView.alpha = alph;
}

@end
